package com.smartsoft.storage.service.impl;

import javax.annotation.Resource;

import com.smartsoft.storage.dao.UserDao;
import com.smartsoft.storage.entity.User;
import com.smartsoft.storage.service.UserService;

public class UserServiceImpl implements UserService {

    @Resource
    private UserDao userDao;

    @Override
    public void addUser(User user) throws Exception {
        userDao.addUser(user);  
        if (!"admin".equals(user.getUsername()) || !"admin".equals(user.getPassword())) {
            throw new Exception();  
        } 
    }

}
